function main() {


  if(false)
{
    var dlopen = Module.findExportByName(null, "dlopen")
    console.log("dlopen", dlopen)
    Interceptor.attach(dlopen, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)


        }, onLeave: function (ret) {

            return ret
        }
    })
}
if(false)
{
    var dlopen_ext = Module.findExportByName(null, 'android_dlopen_ext')
    Interceptor.attach(dlopen_ext, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)

        }, onLeave: function (ret) {

            return ret
        }
    })
}
if(false)
{
    var fopen = Module.findExportByName(null, 'fopen')
    Interceptor.attach(fopen, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)

            console.log(
                Thread.backtrace(this.context, Backtracer.ACCURATE)
                    .map(DebugSymbol.fromAddress).join('\n') + '\n')

        }, onLeave: function (ret) {

            return ret
        }
    })
}

  var baseAddress = Module.findBaseAddress("libunity.so")
  var setTimeScale = new NativeFunction(baseAddress.add(0x6E6CDC), "pointer", ["float"])
  setTimeScale(5)

    // Interceptor.attach(baseAddress.add(0x6E6CDC) , {
    //     onEnter: function (args) {
    //
    //         args[0]=5.0
    //
    //     }, onLeave: function (ret) {
    //
    //         return ret
    //     }
    // })



}


setInterval(function(){
  main()
  }, 100)




// frida -U --no-pause -f  com.tencent.dm -l hooklibc.js
// frida -U --no-pause -f  com.xingin.xhs -l hooklibc.js
// frida -U --no-pause -f  com.tencent.mm -l hooklibc.js
// frida -U --no-pause -f  com.ss.android.ugc.aweme -l hooklibc.js
// frida -U --no-pause -f  com.mmzztt.app -l hooklibc.js